package service.myService.judge;

import java.util.HashMap;
import java.util.Map;

import service.vo.MessageVo;

public class JudgeServiceImpl implements JudgeService {

    @Override
    public Map<String,MessageVo> getMessageVo(String user) {
        boolean b = this.isUser(user);
        Map<String,MessageVo> map = new HashMap<String, MessageVo>();
        MessageVo vo = new MessageVo();
        if(b){
            vo.setDdd("dddd");
            vo.setMess("成功！");
            vo.setName("namexxx");
            vo.setSss("sss");
        }else{
            vo.setDdd("dddxxxx");
            vo.setMess("失败！");
            vo.setName("nameddddd");
            vo.setSss("ssssXXXXX");
        }
        map.put("/view/MyJsp.jsp", vo);
        return map;
    }

    private boolean isUser(String user) {
        boolean b = false;
        if(user.equals("cjm")){
            b = true;
        }
        return b;
    }
}
